package com.runningrookie.controller;

import com.runningrookie.domain.AjaxResult;
import com.runningrookie.domain.OrderInfoBean;
import com.runningrookie.service.OrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/orderInfo")
public class OrderInfoController {
    OrderInfoService orderInfoService;
    @Autowired
    private OrderInfoController(OrderInfoService orderInfoService) {
        this.orderInfoService = orderInfoService;
    }
    @PostMapping
    public AjaxResult saveOrderInfo(@RequestBody OrderInfoBean bean) {
        return orderInfoService.saveOrderInfo(bean);
    }
    @PostMapping("/saveOrderInfoByAnnotation")
    public AjaxResult saveOrderInfoByAnnotation(@RequestBody OrderInfoBean bean) {
        return orderInfoService.saveOrderInfoByAnnotation(bean);
    }
}
